/**
 *  suites.c -
 *
 *  Copyright (C) 2008  ZhangHu
 *  All rights reserved.
 *  E-MAIL: anmnmnly@gmail.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <assert.h>
#include <stdlib.h>
#include <stdio.h>

#include "cunit/CUnit.h"
#include "cunit/Automated.h"

#include "test_chdev.h"


static void test_suites(void) {


}



static int test_init(void) {
    return(0);
}



static int test_clean(void) {
    printf("Unit test is over!\n");
    printf("Please read report file:\n");
    printf("    %s, and %s for details.\n",
           CU_get_result_output_filename(),
           CU_get_list_output_filename());
    return(0);
}



static CU_TestInfo test_cases[] = {
    {"test_suites", test_suites},
    CU_TEST_INFO_NULL
};


static CU_SuiteInfo suites[] = {
    {"test_device_cases", test_chdev_init, test_chdev_clean, test_chdev_cases},
    {"test_cases", test_init, test_clean, test_cases},
    CU_SUITE_INFO_NULL
};


void AddTests(void)
{
    assert(NULL != CU_get_registry());
    assert(!CU_is_test_running());

    /* Register suites. */
    if(CU_register_suites(suites) != CUE_SUCCESS) {
        fprintf(stderr, "suite registration failed - %s\n",
                CU_get_error_msg());
        exit(EXIT_FAILURE);
    }
}

